package com.huike.controller.transfer;


import com.huike.dto.TransferDto;
import com.huike.result.Result;
import com.huike.service.TransferService;
import com.huike.vo.TransferVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.OutputStream;

@RestController
@RequestMapping("/transfer")
public class TransferController {

    @Autowired
    private TransferService transferService;



    @GetMapping("/search")
    public Result queryPage(TransferDto transferDto){
        return transferService.queryPage(transferDto);
    }

    @GetMapping("/find/{id}")
    public Result findById(@PathVariable Integer id){
        return transferService.findById(id);
    }

    @GetMapping("/dept")
    public Result deptList(){
        return transferService.deptList();
    }

    @GetMapping("/user")
    public Result userList(){
        return transferService.userList();
    }

    @PostMapping("/transferClubAndBusiness")
    public Result transferClubAndBusiness(@RequestBody TransferVo transferVo){
        return transferService.transferClubAndBusiness(transferVo);
    }


}
